package com.colorlight.cloud.gateway.api.message;


import com.colorlight.cloud.gateway.api.message.api.GrandShowDefaultProcess;
import com.colorlight.cloud.grandshow.entity.enumerate.NameStruct;
import com.colorlight.cloud.grandshow.entity.event.*;
import com.colorlight.cloud.grandshow.entity.instructions.*;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Demon
 */
@Slf4j
@Component
public class GrandShowAllEventHandler {
	@Component
	public static class RemoveDeviceInstructionHandler implements GrandShowDefaultProcess<RemoveDevice> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.RemoveDeviceInstruction;
		}
	}
	
	@Component
	public static class EncryptInstructionHandler implements GrandShowDefaultProcess<Encrypt> {
		@Override
			public NameStruct getInstructionType() {
			return NameStruct.EncryptInstruction;
		}
	}
	
	@Component
	public static class DecryptInstructionHandler implements GrandShowDefaultProcess<Decrypt> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.DecryptInstruction;
		}
	}
	
	@Component
	public static class TimingEncryptInstructionHandler implements GrandShowDefaultProcess<TimingEncrypt> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.TimingEncryptInstruction;
		}
	}
	
	@Component
	public static class HBEventHandler implements GrandShowDefaultProcess<HB> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.HBEvent;
		}
	}
	
	@Component
	public static class SenderMonitorReportEventHandler implements GrandShowDefaultProcess<SenderMonitorReport> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.SenderMonitorReportEvent;
		}
	}
	
	@Component
	public static class OffLineEventHandler implements GrandShowDefaultProcess<OffLine> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.OffLineEvent;
		}
	}
	
	@Component
	public static class AuthorizationInfoEventHandler implements GrandShowDefaultProcess<AuthorizationInfo> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.AuthorizationInfoEvent;
		}
	}
	
	@Component
	public static class GetMainDeviceInfoEventHandler implements GrandShowDefaultProcess<GetMainDeviceInfo> {
		@Override
		public NameStruct getInstructionType() {
			return NameStruct.GetMainDeviceInfoEvent;
		}
	}
	
	
}
